Technical Field
The present disclosure generally relates to filter optimization. In particular, the present disclosure is directed to an optimized image filter having a weighting function that depends on neighboring pixel values.
Description of the Related Art
With the improvement of display devices, such as televisions, computers, tablets, and smartphones, there is a large demand for high quality images and video. Digital image processing is often used to improve the quality of images and video. For example, image filters are used to digitally reduce noise present in images and video. See U.S. Pat. No. 6,108,455 filed May 29, 1998 and entitled “Non-linear Image Filter for Filtering Noise.”
A common noise reduction filter is a finite impulse response (FIR) filter. An adaptive FIR filter's convolution kernel (matrix of pixels) may be defined by equation (1):
                                          pix            out                    ⁡                      (            i            )                          =                              1                          N              ⁡                              (                i                )                                              ⁢                                    ∑                              j                ∈                Ω                                      ⁢                                          w                ⁡                                  (                                      i                    ,                    j                                    )                                            ×                                                pix                  in                                ⁡                                  (                  j                  )                                                                                        (        1        )            where i and j are 2D coordinate vectors; i represents coordinates of a target pixel that is to be processed; j represents coordinates of a reference pixel; pixin(j) are input pixel values in the kernel; pixout(i) is a filtered value of pixin(i); w(i,j) is a weighting function; N(i) is the normalization factor: N(i)=ΣjεΩw(i,j); and Ω is a search area of an image, which is typically a square kernel of pixels centered on the target pixel.
In general, the filter of equation (1) is a weighted average of surrounding pixels. The weighting function w(i,j) for the filter of equation (1) can be computed in a plurality of ways. For example, the weighting function w(i,j) for a bilateral or sigma filter is a product of spatial weights and a photonic (or range) weights. The weighting function w(i,j) for a bilateral filter may be defined by equation (2):wbilateral(i,j)=f(∥i,j∥)×g(|pixin(i)−pixin(j)|)  (2)where f( ) and g( ) are, ideally, continuous and monotonous decreasing functions, such as a Gaussian curve; and ∥i,j∥ designates a Euclidean distance between the spatial positions of pixels i and j.
Another common filter for noise reduction is a non-local filter. For a non-local filter, the weighting function w(i,j) is dependent upon a difference between patches p of pixels centered on target and reference pixels. A patch, as used herein, refers to a subset of pixels. The weighting function w(i,j) for a non-local filter may be defined by equation (3):
                                          w                          non              -              local                                ⁡                      (                          i              ,              j                        )                          =                  g          ⁡                      (                                                            ∑                                                            k                      ∈                                              p                        ⁡                                                  (                          i                          )                                                                                      ,                                          l                      ∈                                              p                        ⁡                                                  (                          j                          )                                                                                                                    ⁢                                                      (                                                                                            pix                          in                                                ⁡                                                  (                          k                          )                                                                    -                                                                        pix                          in                                                ⁡                                                  (                          l                          )                                                                                      )                                    2                                                      )                                              (        3        )            The image filters described above are well known in the art and will not be discussed in detail in this description.